#include <stdio.h>
#include <assert.h>
#include <limits.h>

int tsub_ok(int x, int y){
    int sub = x - y;
    if ((x >= 0) && (y < 0) && (sub < x) ){
        return 0;
    }else if ((x < 0) && (y > 0) && (sub > x)){
        return 0;
    }else{
        return 1;
    }
}


int main(){

    assert(tsub_ok(1, 2));
    assert(!tsub_ok(1, INT_MIN));
    assert(!tsub_ok(0, INT_MIN));
    assert(tsub_ok(-1, INT_MIN));
    assert(tsub_ok(-1, INT_MAX));
    assert(!tsub_ok(-2, INT_MAX));

    return 0;
}

